//
//  AlarmControlViewController.m
//  SIPphone
//
//  Created by wrt on 14-2-18.
//  Copyright (c) 2014年 wrtsoft. All rights reserved.
//

#import "AlarmControlViewController.h"
#import "SIPInterface.h"

@interface AlarmControlViewController ()

@end

@implementation AlarmControlViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
        self.title = NSLocalizedString(@"zone Control", @"防区控制 Zone Controlend");
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}
- (IBAction)armingButtonPressed:(id)sender
{
    SIPInterface *interface = [SIPInterface shareSIPInterface];
    [interface setAlarmControlArmingOrDisarming:0];
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"notice", @"通知 notice") message:NSLocalizedString(@"arming success", @"布防成功 Arming success") delegate:self cancelButtonTitle:NSLocalizedString(@"OK", @"好的 OK") otherButtonTitles: nil];
    [alert show];
}
- (IBAction)disarmingButtonPressed:(id)sender
{
    SIPInterface *interface = [SIPInterface shareSIPInterface];
    [interface setAlarmControlArmingOrDisarming:1];
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"notice", @"通知 notice") message:NSLocalizedString(@"disarming success", @"撤防成功 Disarming success") delegate:self cancelButtonTitle:NSLocalizedString(@"OK", @"好的 OK") otherButtonTitles: nil];
    [alert show];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
